<template>
	<div>
		<detail-bnner :sightName='sightName' :imgList="imgList"></detail-bnner>
		<detail-header></detail-header>
		<detail-list :list="list"></detail-list>
	</div>
</template>

<script>
	import Banner from '../components/detail/Banner.vue'
	import Header from '../components/detail/Header.vue'
	import List from '../components/detail/List.vue'
	export default{
		name:'Detail',
		components:{
			detailBnner:Banner,
			detailHeader:Header,
			detailList:List
		},
		data(){
			return{
				list:[],
				sightName:'',
				imgList:[]
			}
		},
		mounted(){
			this.getListInfo()
		},
		methods:{
			//获取首页的页面数据
			async getListInfo(){
				const {data:res}=await this.$http.get('data/detail.json',{
					params:{
						id:this.$route.params.id
					}
				})
				this.list=res.data.categoryList
				this.sightName=res.data.sightName
				this.imgList=res.data.gallaryImgs
			}
		},
	}
</script>

<style lang="stylus" scoped>
</style>
